<?php

// 接收事件推送
return function($postObj){
	
	$event = $postObj->Event;		// 事件类型，subscribe(订阅)、unsubscribe(取消订阅)、SCAN(用户已关注)、LOCATION(上报地理位置)、CLICK(自定义菜单)
	$event_file = dirname(__FILE__) . "/event/" . strtolower($event) . ".php";
	if(file_exists($event_file)){
		$func = require $event_file;
		$func($postObj);
	
	}else{
		
		reply_text_msg($postObj, "event error : " . $postObj->Event);
		
	}
	
};